a=int(input("请输入一个整数："))
b=str(a)
yu=len(b)%3
ss=len(b)//3
if yu==0:
    ss-=1
while 1:
    i = 1000 ** ss
    if a<1000:
        print(a%1000)
        break
    else:
        print("%d"%(a//i),end=",")
        a=a%i;
        ss-=1